package com.goldgov.authorityInfo.service;

import java.util.ArrayList;
import java.util.List;

public class AuthorityInfoExt {
	private OrganizationBean organizationBean;
	private boolean ifBindingAdmin;//是否是绑定管理员 1:是	2:否
	private List<AuthorityInfo> list;//权限集合
	private String[] dataCodeList;//方法集合
	
	public String[] getDataCodeList() {
		if (list != null) {
			List<String> authData = new ArrayList<>();
			String[] codes = new String[list.size()];
			for (AuthorityInfo authorityInfo : list) {
				authData.add(authorityInfo.getFunctionCode());
			}
			authData.toArray(codes);
			dataCodeList = codes;
		}
		return dataCodeList;
	}
	public void setDataCodeList(String[] dataCodeList) {
		this.dataCodeList = dataCodeList;
	}
	public List<AuthorityInfo> getList() {
		if(null==list) {
			return new ArrayList<>();
		}
		return list;
	}
	public void setList(List<AuthorityInfo> list) {
		this.list = list;
	}
	public boolean isIfBindingAdmin() {
		return ifBindingAdmin;
	}
	public void setIfBindingAdmin(boolean ifBindingAdmin) {
		this.ifBindingAdmin = ifBindingAdmin;
	}
	/**
	 * @return the organizationBean
	 */
	public OrganizationBean getOrganizationBean() {
		if(null==organizationBean) {
			return new OrganizationBean();
		}
		return organizationBean;
	}
	/**
	 * @param organizationBean the organizationBean to set
	 */
	public void setOrganizationBean(OrganizationBean organizationBean) {
		this.organizationBean = organizationBean;
	}
}